<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>My JSP 'index.jsp' starting page</title>
	<script type="text/javascript" src="<%=path%>/resources/js/jquery-1.11.1.min.js"></script>
  </head>
  
  <body>
    <input type="button" id="zh_CN" value="中文简体" ></input>
    <input type="button" id="en_US" value="English"></input>
    <div id="language">
   <spring:message code="main.title" />
    </div>
    <script type="text/javascript">
    $(function(){
    var lang="";
    $("#zh_CN").bind("click",function(){
    
    	window.location.href="user/changelang?lang=zh_CN";
    	//lang='zh_CN';
    	//$.post("user/changelang",{"lang":lang},function(json){
    	//$("#language").html('');
    //	window.location.reload();
  //  });
    });
     $("#en_US").bind("click",function(){
     	window.location.href="user/changelang?lang=en_US";
    	//lang='en_US';
    	//$.post("user/changelang",{"lang":lang},function(json){
    	//$("#language").html('');
    	//window.location.reload();
    	
    //});
    });
    
    });
    
    </script>
    
  </body>
</html>
